package track3;

public class Number implements Runnable{

    static int number=0;
    @Override
    public void run() {
       while (number<10){
           number++;
           synchronized (Number.class){
               try {
                   Thread.sleep(30);
               } catch (InterruptedException e) {
                   throw new RuntimeException(e);
               }
               if (number%2!=0){
                   System.out.println(Thread.currentThread().getName()+"@"+number);

               }else{
                   continue;
               }

           }
       }
    }
}
